[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
to                       Allows FOR Loops to Count Forward

 for <index> := <start> to <finish> do
   <statement>;

    The TO keyword is used when you want the index variable in a FOR loop
    to be incremented (going from a low to a high value).

         <index>    Any declared ordinal (Integer, Char, Boolean,
                    enumerated) variable.

<start>,<finish>    Any expression of the same type as <index>.

     <statement>    Any legal statement; for multiple statements, use a
                    compound statement.

  -------------------------------- Example ---------------------------------

           for I := 17 to 25 do ...
           for Ch := 'A' to 'Z' do ...

See Also: for downto begin
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson